import request from '@/utils/request'

export function login(data) {
    return request({
        url: '/vue-admin-template/user/login',
        method: 'post',
        data
    })
}
export function deleteRepo(id) {
    return request({
        url: `/repo/delete/${id}`,
        method: 'post',
    })
}
export function deleteRepoBatch(data) {
    return request({
        url: `/repo/delete/batch`,
        method: 'post',
        data
    })
}
/**
 * 
 * @returns 查询所有题库
 */
export function fetchRepos() {
    return request({
        url: '/repo/all',
        method: 'get',

    })
}
export function page(data) {
    return request({
        url: '/repo/page',
        method: 'post',
        data
    })
}
export function create(data) {
    return request({
        url: '/repo/create',
        method: 'post',
        data
    })
}

export function update(data) {
    return request({
        url: '/repo/update',
        method: 'post',
        data
    })
}

